<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>编辑</title>
	<style type="text/css">
		*{
			margin:0;padding:0;
		}
		.form{
			display: block;
			width:400px;
			line-height: 40px;
			margin-left: 40px;
		}
		label{
			color:#000;
		}
		input[type='text']{
			padding:2px;
			line-height: 20px;
			border:1px solid #000;
			outline: none;
		}
		a{
			text-decoration: none;
			color:#fff;
			padding:10px;
			background: #5FB878;
		}

	</style>
</head>
<body>
		<form action="#">
			<div class="form">
				<label>名称</label>
				<input type="text" name='shipping_name' value="{$info.shipping_name|default=''}">
			</div>
			<div class="form">
				<label>编码</label>
				<input type="text" name='shipping_code'  value="{$info.shipping_code|default=''}">
			</div>
			<div class="form">
				<label>详情</label>
				<textarea name="shipping_desc" id="" cols="30" rows="4" value="{$info.shipping_desc|default=''}">{$info.shipping_desc|default=''}</textarea>
			</div>
			<div class="form">
				<label>状态{$info.enabled}</label>
				<input type="checkbox" name='enabled' value="1" <eq name='info.enabled' value='1'>checked</eq>>
			</div>
			<div class="form">
				<a href="#" id='confirm'>确认</a>
			</div>
			<notempty name='id'>
				<input type="hidden" name='shipping_id' value="{$id}">
			</notempty>
		</form>
		<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
	    <script type="text/javascript" src='http://apps.bdimg.com/libs/layer/2.1/layer.js'></script>
		<script type="text/javascript">	
				$('#confirm').on('click' , function(){
					$.post('__SELF__', $('form').serialize() , function(data){
						if(data.status){
							layer.msg(data.info);
							setTimeout(function(){
								parent.window.location.reload();
							},2000);
						}
					});
				});
		</script>
</body>
</html>